package com.yc.fav.mapper;

import com.yc.fav.entity.FavTagFavorite;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 云收藏-关联中间表-6 Mapper 接口
 * </p>
 *
 * @author ly
 * @since 2022-11-06
 */
public interface FavTagFavoriteMapper extends BaseMapper<FavTagFavorite> {

    @Insert("insert into fav_tag_favorite" +
            " select null, id, #{fid} from fav_tag where tname=#{tname}")
    int insertByTname(@Param("fid") int fid, @Param("tname") String tname);

}
